Skip to content

#337 - StopTask: a process stopped on purpose ends as stopped, not as failed - #338

Merged
njoubert-cleverage merged 4 commits into
mainfrom
337
Oct 23, 2026
Merged

njoubert-cleverage merged 4 commits into
mainfrom
337

Conversation

@njoubert-cleverage

@njoubert-cleverage njoubert-cleverage commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #337.

A process stopped by the stop task is stopped on purpose, not failed: it still ends normally (tasks finalized, cleverage_process.end event, exit code 0, parent process going on), and is now clearly identified as stopped.

  • ProcessHistory: new STATE_STOPPED state, setStopped() and isStopped(). StopTask flags the history as stopped instead of failed.
  • ProcessManager: Process <code> stopped log at the success_level (was Process <code> failed at the failed_level); a process failing after a stop still ends as failed.
  • ProcessEvent::isProcessStopped(): set on the cleverage_process.end event of a stopped process (only this process, not its parent). Used by cleverage/ui-process-bundle to record the execution as Stopped.
  • Documentation: stop_task.md (stop vs failure, example on a missing source file), 04-advanced_workflow.md (events), 01-process_definition.md (log levels).
  • Tests: StopTaskTest, ProcessManagerEndLogTest, ProcessManagerProcessHistoryTest (stopped sub-process).

The first commit of this PR (making the process fail) is reverted.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

Behaviour change, to be mentioned in the UPGRADE.md section of the release: after a stop task, ProcessHistory::getState() returns stopped instead of failed, and the end log is Process <code> stopped at the success_level instead of Process <code> failed at the failed_level.

🤖 Generated with Claude Code

njoubert-cleverage and others added 4 commits October 22, 2026 17:15
…ask stops its state with a ProcessStoppedException, so that the process manager throws a ProcessFailedException (fail event, non-zero exit code, failure of the parent process_executor task). Update documentation and tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rocess is not a failure

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… failed: stopped history, "Process <code> stopped" log at the success level, ProcessEvent::isProcessStopped() on the end event

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage njoubert-cleverage changed the title #337 - StopTask: make the process fail for real #337 - StopTask: a process stopped on purpose ends as stopped, not as failed Oct 23, 2026
@njoubert-cleverage
njoubert-cleverage merged commit 3494218 into main Oct 23, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StopTask: identify a process stopped on purpose as stopped, not as failed

1 participant